package com.sunny.example.string;

import java.util.Scanner;

/**
 * HJ38 求小球落地5次后所经历的路程和第5次反弹的高度
 */
public class HJ38_求小球落地5次 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            double height = Double.parseDouble(scanner.nextLine());
            double d = height / 2;
            double th = height;
            double tmp = d;
            for (int i = 1; i < 5; i++) {
                th += tmp * 2;
                tmp = tmp / 2;
            }
            System.out.println(th);
            System.out.println(tmp);
        }
    }
}
